<?php

include_once APPLICATION_DIR.'/application/model/business/bl/GroupCategoryBL.class.php';
class GroupCategoryBL {
    //put your code here
    private static $group_category;
    private $orm = null;
    private $arr_values=null;
    
    private function __construct() {
        $this->orm =new GroupCategoryRM();
    }
    
    public static function getInstance(){
        if(GroupCategoryBL::$group_category == null){
            GroupCategoryBL::$group_category = new GroupCategoryBL();
        }
        return GroupCategoryBL::$group_category;
    }
    
    public function getValues(){
        if($this->arr_values == null){
            $this->arr_values  = array();
            $this->orm->findAllValidGroupCategory();
            while($this->orm->fetch()){
                $this->arr_values[$this->orm->ID] = $this->orm->NAME; 
            }
        }
        return $this->arr_values;
    }
    
    public function getORM(){
        return $this->orm;
    }
}
